package Drink_Decorator_11;

import Drink_Decorator_11.Decorators.MilkDecorator;
import Drink_Decorator_11.Decorators.SugarDecorator;
import Drink_Decorator_11.Drinks.Coffee;
import Drink_Decorator_11.Drinks.Tea;

public class DrinkApplication {
    public static void main(String[] args) {
        Beverage drink1 = new Coffee();
        Beverage drink2 = new Tea();
        System.out.println("饮品配料1: " + drink1.getDescription() + "，价格: " + drink1.cost());

        drink1 = new MilkDecorator(drink1);
        System.out.println("饮品配料2: " + drink1.getDescription() + "，价格: " + drink1.cost());

        drink2 = new SugarDecorator(drink2);
        System.out.println("饮品配料3: " + drink2.getDescription() + "，价格: " + drink2.cost());
    }
}
